[IA64] MCA support - use xencomm to copy SAL error log
authorawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Sun, 29 Oct 2006 16:27:18 +0000 (09:27 -0700)
committerawilliam@xenbuild.aw <awilliam@xenbuild.aw>
Sun, 29 Oct 2006 16:27:18 +0000 (09:27 -0700)
Signed-off-by: Yutaka Ezaki <yutaka.ezaki@jp.fujitsu.com>
Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
Signed-off-by: Kazuhiro Suzuki <kaz@jp.fujitsu.com>
linux-2.6-xen-sparse/include/asm-ia64/sal.h

index 0b210abbe0033ce06a1f7c1db28e8bcf0395ef6e..0cda1c410bf61608d7fb23be67906c713986e84e 100644 (file)
@@ -42,6 +42,9 @@
 #include <asm/pal.h>
 #include <asm/system.h>
 #include <asm/fpu.h>
+#ifdef CONFIG_XEN
+#include <asm/xen/xencomm.h>
+#endif
 
 extern spinlock_t sal_lock;
 
@@ -686,10 +689,28 @@ ia64_sal_clear_state_info (u64 sal_info_type)
 /* Get the processor and platform information logged by SAL with respect to the machine
  * state at the time of the MCAs, INITs, CMCs, or CPEs.
  */
+#ifdef CONFIG_XEN
+static inline u64 ia64_sal_get_state_info_size (u64 sal_info_type);
+#endif
+
 static inline u64
 ia64_sal_get_state_info (u64 sal_info_type, u64 *sal_info)
 {
        struct ia64_sal_retval isrv;
+#ifdef CONFIG_XEN
+       if (is_running_on_xen()) {
+               struct xencomm_mini xc_area[2];
+               int nbr_area = 2;
+               struct xencomm_handle *desc;
+
+               if (xencomm_create_mini(xc_area, &nbr_area, sal_info,
+                          ia64_sal_get_state_info_size(sal_info_type), &desc))
+                       return 0;
+
+               SAL_CALL_REENTRANT(isrv, SAL_GET_STATE_INFO, sal_info_type, 0,
+                                  desc, 0, 0, 0, 0);
+       } else
+#endif
        SAL_CALL_REENTRANT(isrv, SAL_GET_STATE_INFO, sal_info_type, 0,
                      sal_info, 0, 0, 0, 0);
        if (isrv.status)